<?php

namespace app\model\v1\recovery;

use app\model\user\User;
use crmeb\traits\ModelTrait;
use think\Model;

class RecoveryOrder extends Model
{
    use ModelTrait;

    protected $updateTime = false;
    protected $createTime = false;


    protected $type = [
     //   'address' => 'json',
     //   'extends' => 'json'
    ];

    protected $hidden = [
     //   'extends'
    ];
    public function user()
    {
        return $this->hasOne(User::class, 'uid', 'uid');
    }

    public function searchOrderStateAttr($query, $value)
    {
        return $query->where('order_state', $value);
    }


}